3.389 \(\int \sqrt{\frac{-a+b x^n}{x^2}} \, dx\)

Optimal. Leaf size=63 \[ \frac{2 x \sqrt{b x^{n-2}-\frac{a}{x^2}}}{n}+\frac{2 \sqrt{a} \tan ^{-1}\left (\frac{\sqrt{a}}{x \sqrt{b x^{n-2}-\frac{a}{x^2}}}\right )}{n} \]

[Out]

(2*x*Sqrt[-(a/x^2) + b*x^(-2 + n)])/n + (2*Sqrt[a]*ArcTan[Sqrt[a]/(x*Sqrt[-(a/x^
2) + b*x^(-2 + n)])])/n

_______________________________________________________________________________________

Rubi [A]  time = 0.142246, antiderivative size = 63, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.235 \[ \frac{2 x \sqrt{b x^{n-2}-\frac{a}{x^2}}}{n}+\frac{2 \sqrt{a} \tan ^{-1}\left (\frac{\sqrt{a}}{x \sqrt{b x^{n-2}-\frac{a}{x^2}}}\right )}{n} \]

Antiderivative was successfully verified.

[In]  Int[Sqrt[(-a + b*x^n)/x^2],x]

[Out]

(2*x*Sqrt[-(a/x^2) + b*x^(-2 + n)])/n + (2*Sqrt[a]*ArcTan[Sqrt[a]/(x*Sqrt[-(a/x^
2) + b*x^(-2 + n)])])/n

_______________________________________________________________________________________

Rubi in Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \int \sqrt{\frac{- a + b x^{n}}{x^{2}}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(((-a+b*x**n)/x**2)**(1/2),x)

[Out]

Integral(sqrt((-a + b*x**n)/x**2), x)

_______________________________________________________________________________________

Mathematica [A]  time = 0.0651508, size = 77, normalized size = 1.22 \[ \frac{2 x \sqrt{\frac{b x^n-a}{x^2}} \left (\sqrt{b x^n-a}-\sqrt{a} \tan ^{-1}\left (\frac{\sqrt{b x^n-a}}{\sqrt{a}}\right )\right )}{n \sqrt{b x^n-a}} \]

Antiderivative was successfully verified.

[In]  Integrate[Sqrt[(-a + b*x^n)/x^2],x]

[Out]

(2*x*Sqrt[(-a + b*x^n)/x^2]*(Sqrt[-a + b*x^n] - Sqrt[a]*ArcTan[Sqrt[-a + b*x^n]/
Sqrt[a]]))/(n*Sqrt[-a + b*x^n])

_______________________________________________________________________________________

Maple [A]  time = 0.067, size = 105, normalized size = 1.7 \[ -2\,{\frac{ \left ( a-b{{\rm e}^{n\ln \left ( x \right ) }} \right ) x}{n \left ( b{{\rm e}^{n\ln \left ( x \right ) }}-a \right ) }\sqrt{{\frac{b{{\rm e}^{n\ln \left ( x \right ) }}-a}{{x}^{2}}}}}-2\,{\frac{\sqrt{a}x}{n\sqrt{b{{\rm e}^{n\ln \left ( x \right ) }}-a}}\arctan \left ({\frac{\sqrt{b{{\rm e}^{n\ln \left ( x \right ) }}-a}}{\sqrt{a}}} \right ) \sqrt{{\frac{b{{\rm e}^{n\ln \left ( x \right ) }}-a}{{x}^{2}}}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(((b*x^n-a)/x^2)^(1/2),x)

[Out]

-2*(a-b*exp(n*ln(x)))/n/(b*exp(n*ln(x))-a)*((b*exp(n*ln(x))-a)/x^2)^(1/2)*x-2*a^
(1/2)/n*arctan((b*exp(n*ln(x))-a)^(1/2)/a^(1/2))*((b*exp(n*ln(x))-a)/x^2)^(1/2)/
(b*exp(n*ln(x))-a)^(1/2)*x

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt((b*x^n - a)/x^2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.245611, size = 1, normalized size = 0.02 \[ \left [\frac{2 \, x \sqrt{\frac{b x^{n} - a}{x^{2}}} + \sqrt{-a} \log \left (\frac{b x^{n} - 2 \, \sqrt{-a} x \sqrt{\frac{b x^{n} - a}{x^{2}}} - 2 \, a}{x^{n}}\right )}{n}, \frac{2 \,{\left (x \sqrt{\frac{b x^{n} - a}{x^{2}}} - \sqrt{a} \arctan \left (\frac{x \sqrt{\frac{b x^{n} - a}{x^{2}}}}{\sqrt{a}}\right )\right )}}{n}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt((b*x^n - a)/x^2),x, algorithm="fricas")

[Out]

[(2*x*sqrt((b*x^n - a)/x^2) + sqrt(-a)*log((b*x^n - 2*sqrt(-a)*x*sqrt((b*x^n - a
)/x^2) - 2*a)/x^n))/n, 2*(x*sqrt((b*x^n - a)/x^2) - sqrt(a)*arctan(x*sqrt((b*x^n
 - a)/x^2)/sqrt(a)))/n]

_______________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(((-a+b*x**n)/x**2)**(1/2),x)

[Out]

Timed out

_______________________________________________________________________________________

GIAC/XCAS [F]  time = 0., size = 0, normalized size = 0. \[ \int \sqrt{\frac{b x^{n} - a}{x^{2}}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt((b*x^n - a)/x^2),x, algorithm="giac")

[Out]

integrate(sqrt((b*x^n - a)/x^2), x)